<?php echo elgg_view('golfscore/title');?>
<div class="list-course content">
<?php
	$options = array("golf_course_id" => get_input('cid'));
	$golf_course_cards = elgg_get_golf_course_card($options);
	
  //$courses = elgg_get_golf_course();
  echo "<ul class='list_hole'>";
  foreach ($golf_course_cards as $golf_course_card) {
  	  echo "<li class='course' onclick=\"onMapHoleDetail('$golf_course_card->golf_course_id','$golf_course_card->hole');\">";	
  	  echo "<span class='title-course'><label>Hole:</label> $golf_course_card->hole</span>";
  	  //echo $course->golf_course_id;
  	  echo "<span class='hole'>Par <label>$golf_course_card->par</label></span>";
  	  echo "</li>";
  }
  echo "</ul>";
  ?>
  <?php 
  	if(isadminloggedin()) {
  		$golf_course_id = get_input('cid');
  		echo elgg_view('input/button', array('value' => elgg_echo('edit'), 'onclick' => "onMapHoleDetail($golf_course_id)", 'class' => 'elgg-button-submit'));
  	} 
  ?>
 </div>
 
 